package com.example.nettyrpcdemo.config;

import com.example.nettyrpcdemo.core.NettyRpcServer;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.context.annotation.Bean;
import org.springframework.context.annotation.Configuration;

@Configuration
public class BeanConfig {

    @Autowired
    private GameConfig gameConfig;

    @Bean
    public NettyRpcServer nettyRpcServer() {
        return new NettyRpcServer(gameConfig.getRpcPort());
    }
}
